package serialize;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * 实现 java.io.Serializable 接口就可以借助于 JVM 提供的支持来完成对象的 序列化 和 反序列化
 */
public class Human implements Serializable {

	private static final long serialVersionUID = 7209825935459073713L;
	
	private Integer id;
	private String name;
	private char gender;
	private LocalDate birthdate;
	
	public Human() {
		super();
	}
	
	public Human(Integer id, String name, char gender, LocalDate date) {
		super();
		this.id = id;
		this.name = name;
		this.gender = gender;
		this.birthdate = date;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public char getGender() {
		return gender;
	}

	public void setGender(char gender) {
		this.gender = gender;
	}

	public LocalDate getBirthdate() {
		return birthdate;
	}

	public void setBirthdate(LocalDate date) {
		this.birthdate = date;
	}

}
